package com.attendance.common;


public enum ResultCode implements IErrorCode {
    SUCCESS(200L, true, "操作成功"),
    FAILED(500L, false, "操作失败"),
    VALIDATE_FAILED(404L, false, "参数检验失败"),
    UNAUTHORIZED(401L, false, "暂未登录或token已经过期"),
    FORBIDDEN(403L, false, "没有相关权限");

    private long code;
    private boolean flag;
    private String message;

    private ResultCode(long code, boolean flag, String message) {
        this.code = code;
        this.flag = flag;
        this.message = message;
    }

    public long getCode() {
        return this.code;
    }

    public boolean getFlag() {
        return this.flag;
    }

    public String getMessage() {
        return this.message;
    }
}
